home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / VBASIC / NW41BAS.ZIP / SERVERIN.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-07-30  |  9.9 KB  |  305 lines

  1. VERSION 2.00
  2. Begin Form ServerInfo 
  3.    BackColor       =   &H00FFFFFF&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Info on Server"
  6.    ClientHeight    =   3048
  7.    ClientLeft      =   936
  8.    ClientTop       =   1332
  9.    ClientWidth     =   6000
  10.    ControlBox      =   0   'False
  11.    Height          =   3372
  12.    Left            =   888
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   3048
  17.    ScaleWidth      =   6000
  18.    Top             =   1056
  19.    Width           =   6096
  20.    Begin Timer Timer1 
  21.       Interval        =   1000
  22.       Left            =   144
  23.       Top             =   3120
  24.    End
  25.    Begin CommandButton Command1 
  26.       Caption         =   "Return to the Server Selection Form"
  27.       Height          =   375
  28.       Left            =   120
  29.       TabIndex        =   2
  30.       Top             =   2580
  31.       Width           =   5775
  32.    End
  33.    Begin Label Label22 
  34.       BackStyle       =   0  'Transparent
  35.       Caption         =   "Label22"
  36.       ForeColor       =   &H000000FF&
  37.       Height          =   255
  38.       Left            =   2340
  39.       TabIndex        =   9
  40.       Top             =   2340
  41.       Width           =   3555
  42.    End
  43.    Begin Label Label19 
  44.       BackStyle       =   0  'Transparent
  45.       Caption         =   "Label19"
  46.       ForeColor       =   &H00FF0000&
  47.       Height          =   255
  48.       Left            =   2340
  49.       TabIndex        =   10
  50.       Top             =   1920
  51.       Width           =   2535
  52.    End
  53.    Begin Label Label18 
  54.       BackStyle       =   0  'Transparent
  55.       Caption         =   "Label18"
  56.       ForeColor       =   &H00FF0000&
  57.       Height          =   255
  58.       Left            =   2340
  59.       TabIndex        =   18
  60.       Top             =   1680
  61.       Width           =   2535
  62.    End
  63.    Begin Label Label17 
  64.       BackStyle       =   0  'Transparent
  65.       Caption         =   "Label17"
  66.       ForeColor       =   &H00FF0000&
  67.       Height          =   255
  68.       Left            =   2340
  69.       TabIndex        =   17
  70.       Top             =   1440
  71.       Width           =   2535
  72.    End
  73.    Begin Label Label16 
  74.       BackStyle       =   0  'Transparent
  75.       Caption         =   "Label16"
  76.       ForeColor       =   &H00FF0000&
  77.       Height          =   255
  78.       Left            =   2340
  79.       TabIndex        =   16
  80.       Top             =   1200
  81.       Width           =   2535
  82.    End
  83.    Begin Label Label15 
  84.       BackStyle       =   0  'Transparent
  85.       Caption         =   "Label15"
  86.       ForeColor       =   &H00FF0000&
  87.       Height          =   255
  88.       Left            =   2340
  89.       TabIndex        =   15
  90.       Top             =   960
  91.       Width           =   2535
  92.    End
  93.    Begin Label Label14 
  94.       BackStyle       =   0  'Transparent
  95.       Caption         =   "Label14"
  96.       ForeColor       =   &H00FF0000&
  97.       Height          =   255
  98.       Left            =   2340
  99.       TabIndex        =   14
  100.       Top             =   720
  101.       Width           =   2535
  102.    End
  103.    Begin Label Label13 
  104.       BackStyle       =   0  'Transparent
  105.       Caption         =   "Label13"
  106.       ForeColor       =   &H00FF0000&
  107.       Height          =   255
  108.       Left            =   2340
  109.       TabIndex        =   13
  110.       Top             =   480
  111.       Width           =   2955
  112.    End
  113.    Begin Label Label12 
  114.       BackStyle       =   0  'Transparent
  115.       Caption         =   "Label12"
  116.       ForeColor       =   &H000000FF&
  117.       Height          =   255
  118.       Left            =   2340
  119.       TabIndex        =   12
  120.       Top             =   120
  121.       Width           =   2535
  122.    End
  123.    Begin Line Line4 
  124.       X1              =   5880
  125.       X2              =   5880
  126.       Y1              =   420
  127.       Y2              =   2220
  128.    End
  129.    Begin Line Line3 
  130.       X1              =   180
  131.       X2              =   180
  132.       Y1              =   420
  133.       Y2              =   2220
  134.    End
  135.    Begin Line Line2 
  136.       X1              =   180
  137.       X2              =   5880
  138.       Y1              =   2220
  139.       Y2              =   2220
  140.    End
  141.    Begin Label Label11 
  142.       Alignment       =   1  'Right Justify
  143.       BackStyle       =   0  'Transparent
  144.       Caption         =   "Server Date and Time:"
  145.       Height          =   255
  146.       Left            =   300
  147.       TabIndex        =   11
  148.       Top             =   2340
  149.       Width           =   1995
  150.    End
  151.    Begin Line Line1 
  152.       X1              =   180
  153.       X2              =   5880
  154.       Y1              =   420
  155.       Y2              =   420
  156.    End
  157.    Begin Label Label8 
  158.       Alignment       =   1  'Right Justify
  159.       BackStyle       =   0  'Transparent
  160.       Caption         =   "Volumes Supported:"
  161.       Height          =   255
  162.       Left            =   240
  163.       TabIndex        =   8
  164.       Top             =   1920
  165.       Width           =   2055
  166.    End
  167.    Begin Label Label7 
  168.       Alignment       =   1  'Right Justify
  169.       BackStyle       =   0  'Transparent
  170.       Caption         =   "Connections in Use:"
  171.       Height          =   255
  172.       Left            =   240
  173.       TabIndex        =   7
  174.       Top             =   1680
  175.       Width           =   2055
  176.    End
  177.    Begin Label Label6 
  178.       Alignment       =   1  'Right Justify
  179.       BackStyle       =   0  'Transparent
  180.       Caption         =   "Connections Supported:"
  181.       Height          =   255
  182.       Left            =   240
  183.       TabIndex        =   6
  184.       Top             =   1440
  185.       Width           =   2055
  186.    End
  187.    Begin Label Label5 
  188.       Alignment       =   1  'Right Justify
  189.       BackStyle       =   0  'Transparent
  190.       Caption         =   "TTS Level:"
  191.       Height          =   255
  192.       Left            =   600
  193.       TabIndex        =   5
  194.       Top             =   1200
  195.       Width           =   1695
  196.    End
  197.    Begin Label Label4 
  198.       Alignment       =   1  'Right Justify
  199.       BackStyle       =   0  'Transparent
  200.       Caption         =   "SFT level:"
  201.       Height          =   255
  202.       Left            =   600
  203.       TabIndex        =   4
  204.       Top             =   960
  205.       Width           =   1695
  206.    End
  207.    Begin Label Label3 
  208.       Alignment       =   1  'Right Justify
  209.       BackStyle       =   0  'Transparent
  210.       Caption         =   "File Server Name:"
  211.       Height          =   255
  212.       Left            =   720
  213.       TabIndex        =   3
  214.       Top             =   120
  215.       Width           =   1575
  216.    End
  217.    Begin Label Label2 
  218.       Alignment       =   1  'Right Justify
  219.       BackStyle       =   0  'Transparent
  220.       Caption         =   "Netware Revision:"
  221.       Height          =   255
  222.       Left            =   420
  223.       TabIndex        =   1
  224.       Top             =   720
  225.       Width           =   1875
  226.    End
  227.    Begin Label Label1 
  228.       Alignment       =   1  'Right Justify
  229.       BackStyle       =   0  'Transparent
  230.       Caption         =   "Netware Version:"
  231.       ForeColor       =   &H00000000&
  232.       Height          =   255
  233.       Left            =   540
  234.       TabIndex        =   0
  235.       Top             =   480
  236.       Width           =   1755
  237.    End
  238. Dim ConnCode As Integer
  239. Dim Days(6) As String
  240. Sub Command1_Click ()
  241.     If ConnCode <> 1 Then
  242.         ccode% = NWDetachFromFileServer(ConnCode)
  243.     End If
  244.     Unload ServerInfo
  245. End Sub
  246. Sub Form_Load ()
  247.     Screen.MousePointer = 11
  248.     Dim DateTIme As DATE_AND_TIME
  249.     Days(0) = "Sunday"
  250.     Days(1) = "Monday"
  251.     Days(2) = "Tuesday"
  252.     Days(3) = "Wednsday"
  253.     Days(4) = "Thursday"
  254.     Days(5) = "Friday"
  255.     Days(6) = "Saturday"
  256.     ServerName$ = RTrim$(WinsList.ServerList.List(WinsList.ServerList.ListIndex))
  257.     ccode% = NWAttachtoFileServer(ServerName$, 0, ConnCode)
  258.     If ccode% Then
  259.         ConnCode = 1
  260.     End If
  261.     'Get Info from the Prospective Server and place it
  262.     'in the Appropriate place.
  263.     Label12.Caption = ServerName$
  264.     ServerNameTemp$ = String(48, " ")
  265.     ccode% = NWGetFileServerInformation(ConnCode, ServerNameTemp$, MajorVersion%, MinorVersion%, Revision%, MaxxConnections%, MaxConnectionsUsed%, ConnectionsinUse%, NumVolumes%, SFTLevel%, TTSLevel%)
  266.     copyrightNotice$ = String(80, " ")
  267.     companyName$ = String(80, " ")
  268.     Revision2$ = String(80, " ")
  269.     revisionDate$ = String(24, " ")
  270.     ccode% = NWGetFileServerDescription(ConnCode, companyName$, Revision2$, revisionDate$, copyrightNotice$)
  271.     companyName$ = Left$(companyName$, InStr(companyName$, Chr$(0)) - 1)
  272.     Revision2$ = Left$(Revision2$, InStr(Revision2$, Chr$(0)) - 1)
  273.     Label13.Caption = companyName$ + " " + Revision2$
  274.     Label14.Caption = revisionDate$
  275.     Label15.Caption = SFTLevel%
  276.     Label16.Caption = TTSLevel%
  277.     Label17.Caption = MaxxConnections%
  278.     Label18.Caption = ConnectionsinUse%
  279.     Label19.Caption = NumVolumes%
  280.     ccode% = NWGetFIleServerDateAndTime(ConnCode, DateTIme)
  281.     DayNum = Asc(DateTIme.day)
  282.     HR = Asc(DateTIme.Hour)
  283.     MN = Asc(DateTIme.Minute)
  284.     SC = Asc(DateTIme.Second)
  285.     MO = Asc(DateTIme.Month)
  286.     DY = Asc(DateTIme.Date)
  287.     YR = Asc(DateTIme.Year)
  288.     Label22.Caption = RTrim$(Days(DayNum)) + " at " + Format$(HR, "00") + ":" + Format$(MN, "00") + "." + Format$(SC, "00")
  289.     Label22.Caption = Label22.Caption + " on " + Format$(MO, "00") + "/" + Format$(DY, "00") + "/19" + Format$(YR, "00")
  290.     Screen.MousePointer = 0
  291. End Sub
  292. Sub Timer1_Timer ()
  293.     Dim DateTIme As DATE_AND_TIME
  294.     ccode% = NWGetFIleServerDateAndTime(ConnCode, DateTIme)
  295.     DayNum = Asc(DateTIme.day)
  296.     HR = Asc(DateTIme.Hour)
  297.     MN = Asc(DateTIme.Minute)
  298.     SC = Asc(DateTIme.Second)
  299.     MO = Asc(DateTIme.Month)
  300.     DY = Asc(DateTIme.Date)
  301.     YR = Asc(DateTIme.Year)
  302.     Label22.Caption = RTrim$(Days(DayNum)) + " at " + Format$(HR, "00") + ":" + Format$(MN, "00") + "." + Format$(SC, "00")
  303.     Label22.Caption = Label22.Caption + " on " + Format$(MO, "00") + "/" + Format$(DY, "00") + "/19" + Format$(YR, "00")
  304. End Sub
  305.